import axios from "axios";

var httpUrl = "https://api.miaobue.cn";

var call_netA = function(method, url, argument, callbackA, errorback, heads) {
	var method = method || "post";
	var headObj={ "Content-Type": "application/json" };
	if(heads){
		headObj.Authorization="Bearer "+heads
	}
	axios({
		url: httpUrl + url,
		method: method,
		headers:headObj,
		timeout: 5000,
		data: argument,
	})
	.then((res) => {
		callbackA(res);
	}) //请求成功
	.catch((err) => {
		errorback(err);
	}); //请求失败
};

// module.exports={
// 	call_netA
// }
export default{
	call_netA
} 